package com.demo.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
    * 疫苗接种记录表
    */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "vaccination_record")
public class VaccinationRecord {
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 疫苗机构
     */
    @TableField(value = "vaccine_org")
    private String vaccineOrg;

    /**
     * 接种时间
     */
    @TableField(value = "`time`")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date time;

    /**
     * 接种类型：1：第一针，2：第二针
     */
    @TableField(value = "inoculation_type")
    private Integer inoculationType;

    @TableField(value = "name")
    private String name;

    @TableField(value = "id_number")
    private String idNumber;
}